<include file="Public:header" />

<div id="home">
    
    <div id="header">
        
        <div style="height:28px; padding-top:10px; background:url(__PUBLIC__/Front/images/xy.png) 10px 8px no-repeat" class="logo"><span onclick=" history.go(-1);">&nbsp;</span></div>
       
        <div class="shoptitle"><span>积分转赠</span></div>
        
        <include file="Public:righttop" />
        
    </div>
    
</div>

<include file="Public:procat" />

<style type="text/css">
    .pw,.pwt{
        height:26px; line-height:normal;
        border: 1px solid #ddd;
        border-radius: 5px;
        background-color: #fff; padding-left:5px; padding-right:5px;
        -moz-border-radius:5px;/*仅Firefox支持，实现圆角效果*/
        -webkit-border-radius:5px;/*仅Safari,Chrome支持，实现圆角效果*/
        -khtml-border-radius:5px;/*仅Safari,Chrome支持，实现圆角效果*/
        border-radius:5px;/*仅Opera，Safari,Chrome支持，实现圆角效果*/
    }
    .pw{ width:90%;}
    .usertitle{
        height:22px; line-height:22px;color:#666; font-weight:bold; font-size:14px; padding:5px;
        border-radius: 5px;
        background-color: #ededed; padding-left:5px; padding-right:5px;
        -moz-border-radius:5px;/*仅Firefox支持，实现圆角效果*/
        -webkit-border-radius:5px;/*仅Safari,Chrome支持，实现圆角效果*/
        -khtml-border-radius:5px;/*仅Safari,Chrome支持，实现圆角效果*/
        border-radius:5px;/*仅Opera，Safari,Chrome支持，实现圆角效果*/
    }
</style>
<script type="text/javascript">
    function check_member() {
        var id = $("input[name='receiveid' ]").val();
        if (id == '') {
            alert('请填写会员ID!');
            return;
        }
        $.post('{:U("Member/check")}', {"id": id}, function (data) {
            if (data.status == 0) {
                $("#notice").show("");
                $('#headimg').hide();
                $("#nickname").hide("");
                notice.innerHTML = data.info;
            } else {
                $("#notice").hide("");
                $("#nickname").show("");
                $('#headimg').show();
                var src = data.headimgurl;
                var imgcss = {
                    "margin-right": '5px',
                    padding: '1px',
                    border: '1px solid #fafafa'
                };
                var nickname = data.nickname;
                $("#nickname").html('昵称：' + nickname);
                $("#headimg").attr("src", src);
                $("#headimg").css(imgcss);
            }
        }, 'json');
    }
</script>

<div id="main" style="min-height:300px;">
    
    <form name="USERINFO" id="USERINFO" action="" method="post">
        
        <table width="100%" border="0" cellpadding="0" cellspacing="0" style="line-height:30px; padding:10px;">

            <tr>
                <td width="25%" align="right" style="padding-bottom:2px;"><b class="cr2">*</b>您的积分：</td>
                <td width="75%" align="left" style="padding-bottom:2px;">
                    <input readonly="" type="text" value="{$balance}分" class="pw" style='background: #ededed;'  />
                    <input readonly="" type="hidden" value="{$balance}" name="balance"/>
                </td>
            </tr>

            <tr>
                <td width="25%" align="right" style="padding-bottom:2px;"><b class="cr2">*</b>会员ID：</td>
                <td width="75%" align="left" style="padding-bottom:2px;">
                    <input type="text"  value="" name='receiveid' placeholder="转赠会员ID" class="pw" onblur=" return check_member()" required/>
                    <input type="hidden" value="{$id}" name="userid" class="pw"/>
                </td>
            </tr>
            
            <tr>
                <td></td>
                <td>
                    <span style="color:red; margin:auto;" id="notice"></span>
                    <div style="position:relative; width:20%;float:left;">
                        <img width="100%" id="headimg" />
                    </div>
                    <div style="float:right; width:78%;">
                        <p style="line-height:23px; color:#32A000" id="nickname"></p>
                    </div>
                </td>
            </tr>
            
            <tr>
                <td width="25%" align="right" style="padding-bottom:2px;"><b class="cr2">*</b>转赠金额：</td>
                <td width="75%" align="left" style="padding-bottom:2px;">
                    <input type="text" value="" name="total"  class="pw" style="width:40%"/>(最低转赠金额：50)
                </td>
            </tr>
            
            <tr>
                <td align="center" style="padding-top:20px;" colspan="2">
                    <a href="javascript:;" onclick="$('#USERINFO').submit();" style="display:block;background:#e13935;cursor:pointer;width:110px; height:24px; line-height:24px; font-size:14px; color:#FFF; font-weight:bold; text-align:center;border-radius: 5px; overflow:hidden">提交</a>
                </td>
            </tr>
            
            <tr>
                <td align="center" colspan="2">
                    <span class="returnmes" style="color:#FF0000"></span>
                </td>
            </tr>
            
        </table>
        
    </form>
    
</div>

<include file="Public:footer" />